/** 需要引用的依赖
 *
 *
 *
*/


const _fishJS = {

    /** 
     * @desc   找出url的某个字段
     * @param  {String}
     * @return {String} 
    */
    getQueryString: function(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
    },    

    /**
     * @desc   将url参数转为对象
     * @param  传入参数：url
     * @return {Object}
     */
    parseQueryString: function(url) {
        var obj = {};
        var arr = [];
        var key = "",
            value = "";
        var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
        for (var i in paraString) {
            arr = paraString[i].split("=");
            key = arr[0];
            value = arr[1];
            obj[key] = value;
        }
        return obj;
    }

}